//
//  ADScrollView.h
//  OTOClient
//
//  Created by Suny on 15/3/27.
//  Copyright (c) 2015年 Sensoro. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ADScrollView;
@class ADImageView;
@protocol ADModelDelegate <NSObject>
- (NSString *)adImageUrl;
- (NSString *)adDescription;

@end

@protocol ADImageViewDelegate <NSObject>

- (void)tapAdImageView:(ADImageView *)adImageView;

@end

@protocol ADScrollViewDelegate <NSObject>
- (void)adScrollView:(ADScrollView *)adScrollView didSelectModel:(id <ADModelDelegate>)model;
@end

@interface ADImageView : UIImageView
@property(nonatomic,strong)id<ADModelDelegate> adModel;
@property(nonatomic,weak)id<ADImageViewDelegate> delegate;
@property(nonatomic,strong)UIColor *descriptionBackgroundColor;

@end


@interface ADScrollView : UIView

@property (nonatomic,strong) NSArray *modelArray;

@property (nonatomic) CGPoint pageCenter; // pageControl 中心点
@property (nonatomic) CGRect titleFrame;
@property (nonatomic,strong) UIColor *titleBackColor;
@property (nonatomic,strong) NSTimer *timer; // Don't forget set valid when not in front
@property (nonatomic,strong)id  vDelegate;

@property (nonatomic,weak)id<ADScrollViewDelegate>delegate;

- (instancetype)initWithFrame:(CGRect)frame andModelArray:(NSArray *)modelArray;


@end